import 'package:auto_route/auto_route.dart';
import 'package:flutter/material.dart';
import 'package:framework/config/constants.dart';
import 'package:framework/core/base_view.dart';
import 'package:module_home/pages/more_manage/more_manager_logic.dart';
import 'package:module_home/pages/more_manage/widget/more_clear_widget.dart';
import 'package:module_home/pages/more_manage/widget/more_function_view/more_function_widget.dart';
import 'package:module_home/pages/more_manage/widget/more_menu_widget.dart';
import 'package:module_home/pages/more_manage/widget/more_title_bar_widget.dart';

@RoutePage()
class MoreManagerPage extends BaseView<MoreManagerLogic> {
  const MoreManagerPage({super.key});

  @override
  MoreManagerLogic createLogic() => MoreManagerLogic();

  @override
  Widget buildView(BuildContext context, MoreManagerLogic logic) {
    return Scaffold(
      backgroundColor: Color(0xFFF3F3F3),
      body: SingleChildScrollView(
        child: Column(
          children: [
            Container(
              color: Colors.white,
              padding: EdgeInsets.symmetric(horizontal: 8),
              child: Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                mainAxisAlignment: MainAxisAlignment.start,
                children: [
                  /// 关闭按钮
                  MoreClearWidget(
                    onPressed: () {
                      logic.backButton(context);
                    },
                  ),

                  /// 编辑按钮
                  MoreTitleBarWidget(logic: logic),

                  const SizedBox(height: Constants.spaceBase),

                  /// 金刚区
                  MoreFunctionWidget(logic: logic),
                ],
              ),
            ),
            const SizedBox(height: Constants.spaceSmall),

            /// 菜单区域
            MoreMenuWidget(logic: logic)
          ],
        ),
      ),
    );
  }
}
